<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
<title>title</title>   
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
</head>
<script type="text/javascript">
	function updataCi(){
		document.getElementById("fileSpan").innerHTML=
			"<input type='file' id='company_ci' name='uploadFile'>";
	}
</script>
<body>
<c:import url="../common/top.jsp"></c:import>
<div class="container" style="margin: 60px;"></div>

<div class="container">
<div class="row">

<!--  -->
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">
<c:import url="admin_menu.jsp"/>
</div>

<div class="col-xs-9 col-sm-9 col-md-9 col-lg-9" style="border: 1px solid lightgray; border-radius: 5px;">

<h2>기업 추가하기</h2>

<div class="bs-example">
	<form role="form" action="updateCompany.action" method="post" enctype="multipart/form-data">
        <div class="form-group col-lg-4">
          <label for="company_name">기업 명</label>
          <input type="text" class="form-control" id="company_name" name="companyName" value="${cvo.companyName }" placeholder="기업명을 입력해주세요.">
        </div>
        
        <div class="form-group col-lg-4">
          <label for="industry_id">산업 명</label>
          <input type="text" class="form-control" id="industry_id" name="industryName" value="${cvo.industryVo.industryName }" list="industry" placeholder="산업명을 입력해주세요.">
          	<datalist id="industry">
 				<option label="서비스업" value="서비스업" />
 				<option label="제조/화학" value="제조/화학" />
 				<option label="의료/제약/복지" value="의료/제약/복지" />
 				<option label="판매유통" value="판매유통" />
 				<option label="교육업" value="교육업" />
 				<option label="건설업" value="건설업" />
 				<option label="IT/웹/통신" value="IT/웹/통신" />
 				<option label="미디어/디자인" value="미디어/디자인" />
 				<option label="은행/금융업" value="은행/금융업" />
 				<option label="기관/협회" value="기관/협회" />
 			</datalist>
        </div>
        
        
        <div class="form-group col-lg-4">
          <label for="region_id">지역 명</label>
          <input type="text" class="form-control" id="region_id" name="regionName" value="${cvo.regionVo.regionName }" list="region" placeholder="지역명을 입력해주세요.">
          	<datalist id="region">
 				<option label="서울" value="서울" />
 				<option label="경기" value="경기" />
 				<option label="인천" value="인천" />
 				<option label="부산" value="부산" />
 				<option label="대구" value="대구" />
 				<option label="대전" value="대전" />
 				<option label="광주" value="광주" />
 				<option label="울산" value="울산" />
 				<option label="강원" value="강원" />
 				<option label="경남" value="경남" />
 				<option label="경북" value="경북" />
 				<option label="전남" value="전남" />
 				<option label="전북" value="전북" />
 				<option label="충북" value="충북" />
 				<option label="제주" value="제주" />
 			</datalist>
        </div>
        
        <div class="form-group">
          <label for="company_president">기업 대표자(company_president)</label>
          <input type="text" class="form-control" id="company_president" name="companyPresident" value="${cvo.companyPresident }" placeholder="기업 대표자의 이름을 입력해주세요.">
        </div>
        
        <div class="form-group">
          <label for="company_sales">기업매출액(company_sales)</label>
          <input type="text" class="form-control" id="company_sales" name="companySales" value="${cvo.companySales }" placeholder="기업매출액 숫자로 입력해주세요.">
        </div>
        
        <div class="form-group">
          <label for="company_ci">기업 로고(company_ci)</label><br>
          <!-- <input type="file" id="company_ci" name="companyCi"> -->
          <span id="fileSpan">
          <a href="/OffTheRecord/fileDownload.action?fileName=${cvo.companyCi }" >${cvo.companyCi }</a> 
          <button onclick="updataCi()">수정</button>
          </span>
          <p class="help-block">기업의 사진을 업로드해주세요.</p>
        </div>
        
        <div class="form-group">
          <label for="company_info">기업 정보(company_info)</label>
          <textarea class="form-control" rows="9" id="company_info" name="companyInfo" placeholder="기업정보을 입력해주세요.">${cvo.companyInfo }</textarea>
        </div>
        
        <div class="form-group">
          <label for="company_url">기업 URL(인터넷 주소)(company_url)</label>
          <input type="text" class="form-control" id="company_url" name="companyUrl" value="${cvo.companyUrl }" placeholder="기업URL을 입력해주세요.">
        </div>
        
        <div class="form-group">
          <label for="company_address">기업 주소(company_address)</label>
          <input type="text" class="form-control" id="company_address" name="companyAddress" value="${cvo.companyAddress }" placeholder="기업주소을 입력해주세요.">
        </div>
        
        <div class="form-group">
          <label for="company_salary">기업 연봉(company_salary)</label>
          <input type="text" class="form-control" id="company_salary" name="companySalary" value="${cvo.companySalary }" placeholder="기업연봉 숫자로 입력해주세요.">
        </div>
        
        <button type="submit" class="btn btn-default">회사 수정</button>
      </form>
    </div>
</div>

<!--  -->
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3"></div>

</div><!-- row -->
</div><!-- container -->

	<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
    <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>   
</body>
</html>